Master: Complain about inherited joinnodes and dirnodes.

A common cause for this is an attempt to inherit a module that is a dirnode.

Complaining at creation time makes it easier to find the mistake.
Compiler: Fixed some NULL-dereferences.

expr4 nonterminals can be NULL for eg undeclared variables.

Thanks to Jakub Krajewski <jkrajewski@opera.com> for the report.

Fixes [Pike mailinglist 14323].