Fixes repeated nestable-id

Replaces Date.getTime for generating nestable IDs because it totally
fails to generate unique ids and cause lots of problems when using
multiple lists.

Adds a more convenient function to generate unique ids.