Better moving platform collisions

If you hit the left side of a platform while it's moving left… you'll
be pushed left. Right side and it's moving right? You'll be pushed
right.

(No more jumping through the sides of moving platforms!)

Also, I added player.gravity for the base acceleration due to gravity.