added useful.purge to clean a table of elements with a .purge flag (previously part of useful.map). Enriched functionality of GameObject.getXXX queries (return the distance for getNearest, allows passing of predicate)