Go #4: Correct value of firstHalfIndex

The solution was correct before this change, but the value of
firstHalfIndex and the loop condition were incorrect. They were not
working with an index at all, but instead the one-based ordinal of the
middle character.

After this change, firstHalfIndex correctly represents an index and the
loop correctly continues until the character at that index is tested.
Haskell: Simplify Prime functions (inspired)

These improvements are inspired by the "primes" function shown on the
current preview of the new Haskell homepage. My version is more verbose
to be more clear and to allow the "primes" function to use different
sieve algorithms.