Added support for retrieving player units

Added support for retrieving player units. I've also rearranged the way
GetTarget works. GetTarget will no longer retrieve the first target
based on distance. You can still do this by providing your own orderby
function to order the units by distance.