Fix for issue 7272 Unable to bind port 7054

The following fix is for the "unable to bind port 7054" issue that has been reported in https://code.google.com/p/selenium/issues/detail?id=7272.

The issue was mainly because of the unlimited wait that is being used while cleaning the firefox profile.
Added support for waiting with a given timeout.