Javascript type limitation

Javascript numbers are of type double and not longs that means that we should support encoding longs as strings for Javascript clients. See what happens if we round a long to a double https://gist.github.com/jfuerth/5372442 

In the added test I have put a little javascript that will show the rounding.