I just committed some code you can use for a per library preference store:
db.prefs.set_namespaced(namespace, key, val)
db.prefs.get_namespaced(namespace, key, default=None)
use your plugin import name as the namespace (though you can use anything you like).
For the second question, there is no mechanism for that, and the development of such a mechanism will have to wait for the development of multi-client calibre