Register resouces for external plugins

This will allow one to use/develop and extension outside stoq dir and it be
recognized by PluginManager.

For example, if we want to use/develop a plugin called foobar, we would create
the stoq checkout and put the foobar's top directory (probably the git
repository) in a way like:

  stoq_checkout/
    stoq/
    stoq-plugin-foobar/
      foobar/
        foobar.plugin

Also, get the plugin name from the filename.plugin instead of the directory.
For the internal plugins it will be the same, but for outside plugins it will
allow them to have a different name on the directory than the real plugin name.
This is useful to avoid clashes, like: Adding a plugin named "foo", we will
call it's module "stoqfoo" to avoid name clashes with any foo library, but we
want the plugin to be activated on stoqdbadmin with
"stoqdbadmin enable_plugin foo" and not stoqfoo.

Change-Id: Id9872e2315b46e10003374739cb190602d25fa69
Merge "Register resouces for external plugins"