Various fixes to problems discovered by 1000_pairs test and more
[Fix] query updating hive_posts.active
no longer stops update on older active (which can come from edit) - fixes second set of problems with active value in 1000_pairs test
[Fix] delete_hive_post
now properly updates active
value - fixes first set of problems with it in 1000_pairs test
[Fix] order of posts in database_api.find_comments
is now defined by order requested in call parameters (1000_pairs test)
[Fix] added escaping to find_comments
values (escape_chars test)
[Fix] unified checks in various community related calls (in some cases it means there is check where there was none)
added find_community_id
SQL function that follows other find_ routines (there is more places where it should be used, community related get_ranked_posts versions in particular)