bug 43550: return failures from validate

Replace $.each with a for-in so that failure returns actually return.
The validate tests in tests/ext.eventLogging.tests.js didn't catch this
because they monkey-patch warn to throw.

Change-Id: I1437b6e88283c2e0b4ab0b182eb7db257d4a94fe
Merge "bug 43550: return failures from validate"