General API fixing: https://www.bitergia.net/redmine/issues/4045

- get_trends_all_items: Moved to _get_trends_all_items. It should not be called outside metrics class.
- get_items_out_filter_sql: Moved to a private function where it is used (just one place). In a future refactoring probably we should remove it.
- get_bots_filter_sql: Moved to DSQuery class. Probably we should review it, but it is a helper class for building SQL addhoc and filtering bots.