Use WP_CLI::launch to open editor

Also use wp_tempnam to create file, and give the created file a
meaningful name rather than just using system or php's tempfile name.
Handle error caused by reading empty file

`fread()` will throw an error if trying to read an empty file (ie if
user deleted all post content or quit the editor on `wp post create`.
Detect that and fail gracefully.