Refactor Position::pinned_pieces() to use templates