Free memory allocated by the option parser.

Since confuse makes a copy of strings it stores[1] and the glib
option parser allocates strings (and says in the documentation[2] one
should free the strings with 'g_free()'), we should indeed free them
to avoid leaks.

[1] http://www.nongnu.org/confuse/manual/confuse_8h.html#dd02a10fac10c9b028c1438dff28343f
[2] https://developer.gnome.org/glib/2.39/glib-Commandline-option-parser.html#GOptionEntry
Cleaned up finding of free lock instance

The previous algorithm had a O(n**2) list creation and O(n**2) search
for the lowest not-taken lock instance. One could argue that
the numbers involved are small enough to not make a difference, but
this version has a O(n logn) list creation and O(n) search without being
more complicated, so it might be worth it.
Merge pull request #48 from Ed-von-Schleck/lowest_free_lock_instance

Cleaned up finding of free lock instance
Merge pull request #47 from Ed-von-Schleck/parse_function

Free memory allocated by the option parser.