major refactor;

- Connection scripts use begin/ensure blocks,
- env.custom has a warning comment generated at the top,
- Minor syntax cleanup,
- Uses database.yml from the app directory to generate db user/pass/host info,
- Database creation and table creation are now separate from populating env.custom,
- The script runs the database/table creation ONLY on the app master *or* solo instance, not all of them,
- All applications are restarted after writing env.custom (though it's only written for the first app; symlinks could be used, however),
- Variables have been renamed for clearer meaning,
- Misc. improvements