Don't remove last child of root node in haml 4.1+

Version 4.1.0.beta.1 of the `haml` gem no longer creates the special
"EOD" (end of document) nodes when parsing the tree.

Thus we need to only trim this node for versions 4.0.5 and earlier.

Change-Id: I46c4e6887e04157936a29866113db3412de43efd
Reviewed-on: http://gerrit.causes.com/44718
Tested-by: jenkins <jenkins@brigade.com>
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>