* Providing a "refresh" function for triggering a refresh from inside the lib
Some other glitches were fixed too:
* LibraryManager wasn't thread-safe
* Library destructor wasn't unregistering
* Crash when re-registering the same library again
* In LibrariesTest normalization of layouts must not include
re-creation of library references to avoid side effects.
Save without context.
* Added missing files
* Fixed unit tests.