bug 1387096 - cleans up setupdb_app (#3887)
bug 1387096 - cleans up setupdb_app (#3887)

This rearranges some of the code in setupdb_app and changes some of the code so
that it only runs when --createdb is specified.
Tayamarn/socorro,mozilla/socorro,mozilla/socorro,Tayamarn/socorro,AdrianGaudebert/socorro,adngdb/socorro,Tayamarn/socorro,adngdb/socorro,mozilla/socorro,Tayamarn/socorro,mozilla/socorro,m8ttyB/socorro,m8ttyB/socorro,AdrianGaudebert/socorro,lonnen/socorro,m8ttyB/socorro,AdrianGaudebert/socorro,lonnen/socorro,adngdb/socorro,m8ttyB/socorro,AdrianGaudebert/socorro,lonnen/socorro,mozilla/socorro,adngdb/socorro,adngdb/socorro,mozilla/socorro,m8ttyB/socorro,Tayamarn/socorro,m8ttyB/socorro,AdrianGaudebert/socorro,lonnen/socorro,Tayamarn/socorro,AdrianGaudebert/socorro,adngdb/socorro