refactor($compile): use labaled variables to represent nodeType values

This also does some cleanup in $animate