support libc++

This is an initial pass on the patch set for supporting libc++. This set switches between implementations in std:: (found in libc++/c++11) and std::tr1::.

An alternative that hasn't been mentioned is to just use boost:: implementations for everything. The downside to this is that older versions of boost might not be smart enough to properly select libc++ varieties.