fix try_to_append_line for ImageBox
auto merge of #1463 : ksh8281/servo/img_new_line, r=pcwalton

````
<div>
   test
   <img src="test.jpeg"/>
</div>
````

if reduce window size, img is disapper.
this pr fixes this case.
Implement Document::head()

Implementation details according to the specification below:
http://www.whatwg.org/specs/web-apps/current-work/#dom-document-head

This patch is for:
https://github.com/mozilla/servo/issues/1465
auto merge of #1466 : brunoabinader/servo/document-head, r=kmcallister

Implementation details according to the specification below:
http://www.whatwg.org/specs/web-apps/current-work/#dom-document-head

This patch is for:
https://github.com/mozilla/servo/issues/1465

Closes #1465.