Throw std::exception subclasses instead of std::strings

Now everything we throw or catch ourselves is a subclass of
std::exception.
macosx: Stop setting ac_cv_poll_pty, since it was removed in bb651581.
terminaldisplay: Make a for loop's boundary better match its body

Both f and frame.last_frame must have the same number of rows here, but
since we're iterating over frame.last_frame's rows, make that more
explicit.
partial work towards embeddeclient
embeddedclient: fixes / merge newer stmclient.cc
embeddedclient: get rid of ioctls, require window size passed in
gitignore emdriver
embeddedclient: Don't initialize the terminal
embeddedclient: Dump row-by-row framebuffer diffs to stdout

Now we are no longer using Terminal::Display, i.e., nothing assumes that
stdout is a terminal.

Obviously debug_contents should go away eventually.
Split embeddedclient into static library
embeddedclient: Move cols/rows from main() to ctor
embeddedclient: Move mainloop out and into emdriver
emdriver: Another sync (e2abb852)
embeddedclient: get rid of vestigial local display for local terminal
Another sync (10ac25f0)
embeddedclient: Expose handle_exception