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:

  - Changing one of the URLs in THEME_URLS in general.yml

  - 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.