Bug 849866 - fix signed/unsigned comparison warning in nsDocument::Register; r=smaug