Custom value types and name checks

- can now register custom value types (like $context for bootstrap)
- added checks for valid function identifiers in new_closure()
- added checks for closure keys/values in new_closure()