fix tileYToDegree and tileXToDegree implementation, take into account that the last tile may be smaller
(cherry picked from commit 4f4de39)