Wait for back history before going to search page

Creating deferred object when calling router.back()
onpopstate checks for this and resolves.

Fallback to timeout for browsers that do not support onpopstate
Tested fallback, 50ms is adequate before redirecting

Bug: 65676
Change-Id: Ib1534a41e0daf0c9e4a67a9bc4e96dac036cb34d
Standardize on jQuery.each vs forEach

Bug: 63454
Change-Id: I500125701cf4d7f1245786de2e413616b2c0446b
Merge "Standardize on jQuery.each vs forEach"
Merge "Wait for back history before going to search page"