Bug fixes around advanced function resolution

 * Now supports sinon stubs as dependencies
 * Will return function dependency directly when the function's dependencies/arguments cannot be resolved
 * No longer throw exceptions when a function's `.toString()` results in an unexpected format