Fix logic around marking services resolved or not

If you app->extend an object after it's been bound but before it's
been resolved, it will be initialized right away. The solution is
to just check if an object has actually been resolved rather than
if it's bound.

A related issue that can also be solved as a part of this is that
you can't extend deferred services. This has also been fixed.
tests for 3841d39
Merge pull request #4648 from alprs/fix/extend-resolved-4.2

Fix premature instantiation of extended bindings and extending of deferred services