debugging: add '--debugsolver' CLI switch.

it engages goal.write_debugdata() to leverage libsolv's
testcase_write(). this should become the standard way to start dealing
with "this doesn't resolve, DNF is broken" bugs.

unsure about --debugrepodata yet: it is inferior to testcase_write() but
can be used without running a Goal (is that ever useful?).