Make theme URL to theme name mapping consistent

The code that extracted the theme name from each entry in THEME_URLS (in
order to require code from a directory whose leaf name is the theme
name) only supported git URLs that ended in '.git'.   However, the
themes:install rake task usefully supports a wider range of git URLs -
for example, all of the following were supported:

   /home/whoever/themes/blah-theme => blah-theme
   /home/whoever/themes/blah-theme/ => blah-theme
   git://wherever/blah-theme.git => blah-theme
   ssh://wherever/blah-theme.git// => blah-theme

This commit factors out a theme_url_to_theme_name method,
adds tests for it, and uses that method in both:

   lib/tasks/themes.rake
   config/initializers/theme_loader.rb

... so that a wider range of theme URLs are consistently supported.
Add a script to help switch theme for local development

When working locally, it's useful to be able to switch between
themes quickly, which essentially involves:

  - Updating the general.yml symlink to point to a theme-specific one

  - Updating the public/alavetelitheme symlink

  - Making sure that the theme exists as vendor/plugins/<theme-name>

This script lets you switch between themes kept in a directory
which is by default called 'alaveteli-themes' at the same level
as your Alaveteli git repository, or can be overriden by the
environment variable ALAVETELI_THEMES_DIR.
Merge branch 'switch-theme-script' into rails-3-develop

Conflicts:
	config/initializers/alaveteli.rb