Added two more methods to detect nested typedefs, this time including reference types, which caused problems for the previous system. Added unit tests for detect_traits.h