Changed tile.lua to generally make more sense.

Gave everything better names, commented everything better, created new
functions that make more sense, make collision return a table. (I had
forgotten to return velocities before!)