Fixes #29, Fix memory leaks for commands in main.c

Commands are held in an array and has options to control the identity
for the command and the function to call for it.
Add main.h that holds the macros and types for main.c.

Remove parameter name from forward declarations.

Don't cast size_t to int, when not needed.
Fix memory leak when initializing sophia.

I've been trying to find the cause for 2+ days, and it turns out to be
this simple. MFW I found out it's because they're mismatched, ugh!
Correctly return the status code.

goto doesn't return the calling context, so we can't expect to run any
statements after a goto.