Fix Seam Autowire issue when handling cycles and non-resolvable components.

Add tests for these scenarios.