Reddit sorting algorithms

added Javascript versions of the Reddit sorting algorithms, not sure
what the license is on those, though, in a few commits I'll probably add
it in somewhere