Reorganize main() workflow, fix invalid JID bug and validation.

This commit rewrites the main workflow with the intent to have better control on exception handling.

It fixes a bug when the user inputs an invalid JID like 'user@'.

It fixes #13 because it turns XMPPVOX-level JID validation into a warning instead of error condition.