Fixing similar tags module query

Only group by m.core_content_id to avoid duplicates. Move "having" to "where", better to filter before grouping where it's possible.
Expanding the filter for the current item to also include the type_alias, otherwise items with the same id but from other extensions would be excluded as well.

This fixes two issues:
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30609
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30603