JavaScript sleep function

Wait X milliseconds.