lxml.html.document_fromstring ensure_head_body

When using lxml.html.document_fromstring to process html outside your control,
you can't be sure it will have a head element or body element. Allowing
document_fromstring to accept an ensure_head_body option saves you from having
to write code like:

    doc = document_fromstring(html)
    try:
        doc.head
    except IndexError:
        doc.insert(0, Element('head'))
    # now we can safely reference doc.head

You can instead just write:

    doc = document_fromstring(html, ensure_head_body=True)
Merge pull request #140 from jab/master

lxml.html.document_fromstring ensure_head option