chimera: Optimize read of file and directory attributes

Chimera's inode class provides convenient access to the attributes stored in
the inode table. It also supports caching that information, which allows it to
be used in modular code without repeated loading of the same database row.

Chimera does not provide such support for attributes not stored in the inode
table, eg locations, access latency, retention policy and tags. Those have to
be queried through the FileSystemProvider interface. Besides not being
particularly OO like, this approach lacks the convenient caching feature of the
inode.

This patch introduces the dCache specific ExtendedInode subclass of FsInode.
It provides access to those attributes that are not stored directly in the
inode table. Those attributes are cached, which means the ExtendedInode class
is primarily intended for reading an inode, not for updating it.

In particular access to locations and tags has been optimized. Previously
locations could only be read for a particular location type, requiring two
queries to the database. This cost of reading all locations at once is likely
to be very close to that of just reading locations of one type, so this patch
adds means through which to read all locations in a single query. Likewise for
tags: Existing code would always first check for the existence of a tag by
loading the entire list of tag names for a directory. It would then for each
tag do another lookup in the same table to read the tag id, followed by a read
in another table to load the data. This has now all been collapsed to a single
method capable of reading all tag data in one operation by joining the two
tables.  The data is cached in the ExtendedInode, which allows those tags to be
access by the storage info extractor without additional queries.

Target: trunk
Require-notes: yes
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6611/