Prototype for createSpyObj to allow for typed spies

Added an overload to the prototype for createSpyObj to allow it to return a strongly typed spy object via use of generics
Merge pull request #1194 from danrspencer/patch-1

Prototype for createSpyObj to allow for typed spies