Add relationship to resource and filter method for catalogs

This commit allows to filter a Catalog for a specific Resource by
type and title and returns a Resource containing all linked Resources.

Here is a quick example:

    >>> catalog = db.catalog('hostname')
    >>> resource = catalog.get_resource('Service','ntp')
    >>> for rel in resource.relationships:
    >>>     print(rel)
    Class[Ntp] - contains - Service[ntp]
    File[/etc/ntp.conf] - notifies - Service[ntp]
    File[/etc/ntp.conf] - required-by - Service[ntp]

This could be useful when adding a kind of "catalog viewer" to puppetboard to inspect the catalog of a node.