Changed output format for getTagsByObjects

The output is now an associative array with object ids as keys and tag
names as values. This makes it more convenient to use for callers.