Factor out pawn attacks in 'lever'

Improves readibility and possibly speed.

No functional change.