util: fixed behavior of isObject()
This fixes issue #743 (closed).
Brought the behavior of util.isObject() in line with expected behavior, inspired by utility libraries like underscore & lodash. In particular, it now returns true for functions.
Added eight tests for isObject() to ensure it behaves as expected for a wide variety of input, including cases where it is expected to return false.