rewrote new tile code to be android friendly

changed setFlippedX/Y() on web side to match c++ engine's setFlipX/Y()