Added tracing option to Select queries

Previously the only way to see a trace explaining why a particular
query was true was to set debug_mode() on Runtime and inspect the
log.

This change makes it possible to ask for the trace when running
a select query.  The Runtime.select() now either returns a singleton
if tracing is False (like always) or (answer, trace) if tracing is
true.  This ensures the change is backwards compatible.

Closes-bug: 1356626
Change-Id: I5a67ddbdf4cb4d000fdc78b0d6192eb284f9abb1