OnLoadEvent function expressions. 

cf10 says isObject for function expressions == true, so reworked the if structure in onloadevent. Updated the tests to not fail with a compile error on cf9.

https://github.com/framework-one/fw1/issues/278