lookupvar for empty variable returns nil not undefined

As per Andy Parker's work, `lookupvar` in custom functions and
`scope.lookupvar` in a template will now return `nil` not `:undefined`
when a fact or variable has no value.