Containers resolve instances.

When a container has an instance traits, the instance's klass is
properly resolved when given as a string.
Added test
Removed whitespace changes
Merge pull request #5502 from Zaharid/iniinstance

Containers resolve instances (traits).