fix: StackOverflowError for singleton scope
add: tests for singletons with cyclic dependencies
Merge pull request #792 from Artyomcool/singleton-circular-reference

fix: StackOverflowError for singleton scope