legal-move? bugfix: check for pawn extremities before attacks

When there are pawns on extreme ranks, the attacks? check can crash,
so we just need to check for those first.
Version bump