Proper freeing of restraint client's AppData

This patch adds a function to properly free AppData at the end of client's
execution.
Proper cleanup of parsed arguments.

Clean up arguments parsed by glib's commandline option parser.