major overhaul to move yuchen::utils.h to nsIDocument.h, attributing accesses to their onwer document correctly. However, websockets and NPAPI tracking is lost.