cli: Fixed handling of empty line, and misc. cleanup

Interactive console's argc wasn't being checked, resulting in
a bogus "Unexpected command:" and often segfaults.

In other news, I failed to note in the previus changeset that at
least half the cli changes were authored by Brian Padalino...so
doing that here - ec54e4e4097c3d96e0985c9130a867f9bc808a17