BUG-981: improve waitForSchema() reliability

SchemaLock.waitForSchema() should not check presence of codecs, but
rather only look at available definitions. Rework it such that it is
more useful.

Change-Id: I0e6240dad78d1e4987b3c7e8b4171b0e117e4792
Signed-off-by: Robert Varga <rovarga@cisco.com>