add UnitConstPtr, fixup const correctness

Const correctness got dropped in some places for simplicity when
first introducing UnitPtr, now going back to add it again after
testing that the switchover worked.
more const correctness fixes
fixup more const correctness, in lua api
fixup const correctness in whiteboard
remove unit.hpp include from team.hpp