Added upvote

I've already upgraded all the old posts to have the upvote field. Tested on my machine and it is working ok. This is my first js program so critics are welcome!

The method to rank posts is extremely simple: weight = upvote - number of days since posted.