India vows to strengthen its online security after high school exam papers were leaked ahead of crucial tests, forcing millions of students to resit their finals.