Added tests, removed isNewAggregate.
Resolve now uses ClassTags instead of TypeTag (race conditions, renamed to resolveUnsafe).
Backported tweaks from feature branch.