Move window error handling into Tracker constructor

Attach to the `onerror` handler in `BH.Lib.Tracker` constructor to automatically track errors.