Make the forward_mercator function's handling of edge cases better.
Merge pull request #796 from iwillig/forward_mercatorFix

Make the forward_mercator function's handling of edge cases better.