Nio personer har klämts eller trampats till döds i folkmassor vid ett populärt tempel i södra Indien.