Delegate reflection

Fixed problems with reflection in delegate types.
Added correctly defined "Invoke" method.
Fixed delegate base type.
Fixed #499, #500.