Make wait_for a separate shell script

wait_for() function is used in both init-keystone and devtest_seed.sh,
but the latter doesn't import its definition, so running of this script
leads to "wait_for: command not found" error.

wait_for() can actually be made a separate shell script to make it possible
to use it from any other script (because we add the scripts/ dir to PATH).

Fixes bug 1234704

Change-Id: Id5017e1d4b660a58a9dd75e6e18450744d3399a7