Break ctrl_highscore down into several functions, change score handling

ctrl_highscore now calls read_highscore and write_highscore in order to
change the highscore table. Also, instead of fumbling around with
SCOREARRAYSIZE, the last score in the highscore list is now (if the new
score is higher) replaced by the new player score before sorting the
array.