Changed functionality on CreateInstance.

Will now always pick the constructor with the most parameters which it
is able to resolve.
Added caching on created types for better speed on future creatings.