More regular enforcement of maximum hit points.

This impacts [transform_unit], [effect]apply_to=type, [effect]apply_to=variation,
and wesnoth.transform_unit().


git-svn-id: http://svn.gna.org/svn/wesnoth/trunk@56018 75b3775d-3801-0410-9e12-e2e43121521d