Bugfix issue #38 and drafting feature in issue #34

For issue 38:
moved code in main.c

For issue 34:
Extended struct mysql_session_t
Created structs default_hostgroup_t and global_default_hostgroups_t