Implemented retry.wrap for #6, also added tests and documentaion

This should check for typeof key === 'function', so that other properties on the object that are not functions aren't taken as such.