Copy token attributes and allow arbitrary data to be attached to the attributes

Addresses #102 and also fixes an issue where modifying attrs.value would change the value of the datum in the typeahead.