Nbagg enhancements

Extends the nbagg backend to support animation, improves some of the code, and fixes a focus issue when closing figures.
Yep you're right.