add template function to perform DerivedFromBase checking.
port FileUserdata to new Userdata mechanism.
port TimestampUserdata to new Userdata mechanism.