Bug fixes for rails_deploy.fact.j2

* Use `has_key('stat')` instead of `stat.exists`.

* Don't assume that `ansible_local` is always defined.
Ensure git package is installed
Skip all database tasks unless database is created
Merge branch 'jscheid-fix-rails-deploy-fact'
Merge branch 'ensure-git-package' of git://github.com/jscheid/ansible-rails_deploy into jscheid-ensure-git-package
Merge branch 'jscheid-ensure-git-package'
Merge branch 'database-conditional' of git://github.com/jscheid/ansible-rails_deploy into jscheid-database-conditional
Merge branch 'jscheid-database-conditional'