Modify install_rally.sh to install under BSDs

The sed command (line 138) responsible for setting the database
connection string in the configuration file of Rally, is only GNU sed
compatible. The BSD systems (ex. FreeBSD, OS X) use a different sed
implementation. The in-place editing differs in these two versions. This
commit modifies the sed command in a way to be compatible for both
implementations.
It creates a temporary file and sends the output of sed to that file,
and then it replaces the original file with the temporary one. It is
actually what the --in-place switch of GNU sed does in the background
[1].

[1] http://www.gnu.org/software/sed/manual/sed.html

Change-Id: Idef71121416c1c6c5d70ab6e041f89a7b441b1f9
Merge "Modify install_rally.sh to install under BSDs"