Corrected a couple of errors

Hi,

When using the example code I discovered two details that I've corrected:

1. The point sorting was being done in the incorrect order. (Y must be sorted after X).
2. The last element of the hullPoints array should be removed in order to plot a correct convex hull.

I also added a simple .html example to play with, it shows two polylines, one with the old example and one with the new one.

Cheers!
Jose