India navy chief resigns after submarine accident