Reset the tail pointer of a tree node when destroying the child node
pointed to by the tail pointer.

This was causing a problem when parsing cilpolicy due to the following
line in contrib/dbus.cil:

(macro dbus_stub ())

Because there are no rules in this macro, the tail pointer was still
pointing to the parameter list after it was destroyed and cil_tree_walk()
called __cil_build_ast_last_child_helper() on the already freed node.

Fixed a case in cil_resolve_in() as well.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>