Importing poll_until method from correct place

Old place was used for functional testing and can be removed after
trove refactoring.

Change-Id: I8992d211f47b719bc1fdcae0d321c733c9cc4989
Fixed: bug #1228306
Merge "Importing poll_until method from correct place"