Fix solib file name on MacOS X

On MacOS X the library version goes before the library extension (dylib).  This
patch adds two helper functions that are used by the install rule to get the
correct library file name.
Fix solib version for symstall rule

The same change as f0dbeb9 but for the symstall rule.
Indentation cleanup and add missing license header to libgdbr