(cherry picked from commit 614d832)
Fixes: lp:1777519 * https://bugs.launchpad.net/kicad/+bug/1777519
SELECTION now holds EDA_ITEMs not BOARD_ITEMs so various places had to change to casting the selected items to BOARD_ITEMs. Fixed compilation warnings on clang (Tom)