Make error messages and output codes more logical

Use `WP_CLI::error` for any fatal errors. Output a warning rather than
an error if user aborts the editor (At this point it exits without
performing any action just like an error would, but it shouldn't be
considered an error. Also, its possible that commands using the editor
function will go on to perform other actions.)

Also, whitespace cleanup and minor refactoring... making a helper
method `_edit()` in post.php to make editor functions more reusable.