Implement document.readyState()

Tells js whether the page has finished loading.