Unit tests for engine's YAQL functions

Also fixes several declaration errors in tested functions

Change-Id: If7a742c7f6d944d03e1a327e2ae2866b464472a4