Fix crash upon struct loopup on unknown struct.

get_struct_member_result_type() did not check for a NULL
pointer when determining the return type of a struct
member lookup. That happened when the struct was unknown.
Additionally get_lpctype_name_buf() did also not account
for pointers to the struct being NULL.
(fixes #836)