Implement BBM.fn.pruneID() for issue #10.

Basically, run through the subtree looking for duplicate
IDs. Delete the attribute if a given ID is already defined
earlier.