Added getClosestTerrainExit to AIMesh

- @dotdeath this is for you: getClosestTerrainExit(Object *a, Vector2
TeleportLocation, bool isDash); Third argument is true by default.
Haven't tested it yet, but it gives you the closest exit out of terrain.
If you're dashing, it only gives the one going towards you, but when
isDash is false, it could teleport over it, like Fiddle's ult.
- Increased ray direction length to actual coordinates..
- Added invertRay functionality, it checks if it hits terrain, but now
can also checks when it stops hitting terrain

** This is all untested, sorry **