CORE+RPC: fixes for ResourcesTags

 - added javadoc for ResourcesTags methods in RPC
 - added test in core for some ResourcesTags methods
 - fixed SQL in selecting assigned tags from resource