async-wrap: use int64_t for uid

The maximum integer value in JS is 2^53. Meaning, if the uid was
increased every 100 ns there would be enough values to last over 28
years. That should be enough to suffice everyone.

Also had to use a template function when setting the parent class
because static_cast was failing.