Split permission checks

Began moving object permission checks into global functions.  This begins the process with the Post permission checks.  We will also need to do this for Users and Terms.

ef44a2d5988ef3973ae62f8d37ecd81c144b586f Changes my initial approach based on feedback from @rmccue 


Won't we need `json_check_user_permission`, `json_check_comment_permission`, and `json_check_term_permission`, etc correspondingly?