Importing from Rcpp the new code and related changes for exposeClass(),
as of rev 4560.