Track library name in ParsingContext

The <package> element seems to define the name of the underlying
shared library. This information is needed for the generation of
several things. Track it in ParsingContext.
Also copy the library name when copying a ParsingContext
Add parsing method for <record> elements
Improve shared library name parsing

If multiple packages are defined, use the first one. If the namespace
element declares a shared library name, it takes precedence over
everything, but not all .girs look like this.