Improve upvoting algorithm

- Combine db query and voting validations into one function for efficiency
- Function will still grab the post from db and check to see if the user has voted