BUG Fixing queries on non-existent table breaking archive site

With a many to many relation, e.g. SiteTree_MyRelation, and listing
them in your template then adding ?archiveDate=x in the URL, a SQL
error is shown because Versioned::augmentSQL() tries to query the
non-existent table "SiteTree_MyRelation_versions" assuming there's
versioning setup, but there isn't.

I've added a test to expose this scenario, and the fix is to simply check
the table exists before augmenting the SQL in Versioned.