use boost::variant for primitive_variant + cleanup

aside from replacing the implementation of primitive_variant,
this patch removes some `using namespace std` lines due to name clashes,
uses boost string algorithms such as boost::join rather than providing
own implementations, and removes some obsolete classes and files