Clarify and constrain test environment

I'm not sure when, but at some point the test_environment
lost track of where its templates were and stopped using
the correct database configuration when starting up.

These changes make sure that

* templates and the current code are linked into the test_instance
* the test_instance uses the right database settings
* the Session for the current test module is freshly configured
* that we don't recursively generate test_instances within each
  one

This is one of a few different instances of

* how did it ever work right before
* these tests are just wrong and we ought to make them right

This solution was reached by trial and error and was only discovered
because when manipulating templates for tests the changed templates
were not being reflected in the tests.
Fix links in profiles

fix #1038

This addresses to separate but related issues:

1. recently changed tiddler lists were non-friendly, non-space
   links, now they are
2. wikilinks in the profile text, when relative (markdown, twikifier)
   were going to 404 because they are looked for in tiddlyspace.com/profiles

Fix 2 was relatively straightforward: adding a <base> pointing
to the user's space. This gets behavior that is similar to what would
happen if the profile was viewed in the user's space.

Fix 1 was weird. Simply adding 'friendly=True' to the tiddler_url call
when listing tiddlers didn't work. This is because the fixups were
not applying in the profile module. Viewing the diff indicates the
necessary changes.

This change also adds a title to the profile page. Apparently this
had never been there.