CLI exits on first command when a credential is invalid.

Currently CLI goes back to a normal command line loop showing a
prompt even when a previous command failed because of an invalid
credential. This is confusing as it can appear as if authentication
was successful and CLI was ready to take commands. The new behavior
is that CLI will exit upon a first command if a credential is
invalid, displaying a corresponding error message.

Fix MN-718

Change-Id: I2ceb940f35c7418edee3601a7fc55874e24436dd
CLI exits on first command when a credential is invalid.

Currently CLI goes back to a normal command line loop showing a
prompt even when a previous command failed because of an invalid
credential. This is confusing as it can appear as if authentication
was successful and CLI was ready to take commands. The new behavior
is that CLI will first run a test command to see if a credential is
valid, and exit right after if invalid, displaying a corresponding
error message.

Fix MN-718

Change-Id: I2ceb940f35c7418edee3601a7fc55874e24436dd
Merge branch 'dev/tomohiko/mn-718/20131031' of https://github.com/midokura/python-midonetclient into dev/tomohiko/mn-718/20131031
Added an error handling for connection refused to API server.

Change-Id: I4eb640e3072f880491438985872daae425e3296d
Added an error handling for connection refused to API server.

Change-Id: I4eb640e3072f880491438985872daae425e3296d
Merge branch 'dev/tomohiko/mn-718/20131031' of https://github.com/midokura/python-midonetclient into dev/tomohiko/mn-718/20131031

Conflicts:
	src/bin/midonet-cli

Change-Id: I9b966fd8574bea658e1e679e37bea8c25c6bebbc
Merge pull request #82 from midokura/dev/tomohiko/mn-718/20131031

CLI exits on first command when a credential is invalid.