Tower targeting and object find criteria

- Added a function to select an object in range that best satisfies a
given criterion.
- Towers use this functionality to target the object in range that is
closest to the goal.
- Fixed a bug with selecting the closest target in range.