Changes 'documentload' event behavior.
Merge pull request #4617 from yurydelendik/documentload

Changes 'documentload' event behavior.
Adjusts mozcentral test files
Refactoring - remove duplicated code in TextLayerBuilder