monitor_reconfig: Handle external monitors and add tests.

This splits the resolution-choosing logic out into its own
class to make it easier to test.  It also adds some
probably-unreliable heuristics to try to guess when the user
would rather that we just use the external output's maximum
resolution instead of trying to find a resolution that'll
also work on the built-in output.

TEST=added a bunch

Review URL:
6 files changed