Generate a BSON ObjectID from a timestamp

Essentially just the first part of your generate function.