Simplified stop code

From the robotc wiki: " If you set the variable to 'N' (where 'N' is greater than 1) then the first 'N-1' consecutive clicks of the EXIT button can be handled by the application program. On the N-th consecutive click the firmware will automatically EXIT (i.e. end) your program." Edited the code to reflect this. Also simplified and corrected nextMode and last mode, because it will not automatically rollover to a valid enumerator value.