Fix #15073 Infinite loop on empty namespace

The issue tracker name is a bit misleading, the actual problem is in .remove() not .off() - I'm happy to rename the tracker if needed.

Get an infinite loop if types parameter of .remove() has any trailing dots. Fix this by removing any trailing dots and removing the empty namespace

jsFiddle of the issue here http://jsfiddle.net/EJTyW/5/