v2 migration code

1. Use environment variables when applicable
2. Rename action hooks appropriately
3. Update documentation
4. database.yml need not be modified for Ruby 1.9