Do not use global document

Use OO.ui.Element's getElementDocument instead of global document

Change-Id: I07365da32c49421d0fe235cb4ca66245f8d48986
Merge "Do not use global document"