Fixed problem with early snake segment "hiccup"

Also optimized snake segment positioning code - not O(n^2) any more.