Improve HIMN IP-finding error handling

Previous code could dereference nil if there was no error, but an
empty IP was found
Separate config defaults from validation
Also close listener connection when port forwarding fails

Follow-up to 97df6fd283f7f3626e6ad80830dbeb0815428d08
that actually fixes the "Waiting for SSH" hang
Add keep_instance parameter

Determines when to keep the VM instance and when to clean it up
Can be one of "always", "never" (default), "on_success"
Factor out common port-finding code

Fixes bug where we would infinite-loop trying to find an HTTP server
port when all ports were unavailable (e.g. range [80,80] and no root
permission)

Also fixes bug where SSH port forwarding would try ports up to but not
including HostPortMax.

Also add clarification in error messages for which port range to expand
Add keep_instance to example config
Add user variables to template processor
Fix export UUID
export_format: allow export format to be configured

"export_format" can be one of "xva" (default), "vdi_raw"
Fix comment typo
Merge pull request #7 from chengsun/master

Improvements and bug fixes