Fix rounding during polyline encoding

Casting as int() behaves like math.Floor()
Fix and test point.bearingTo()
Merge branch 'fix-polyline-encoding-rounding'

* fix-polyline-encoding-rounding:
  Fix rounding during polyline encoding