Risk-aware Integrated Task and Motion Planning for Versatile Snake Robots under Localization Failures