Make def's return value more consistent.

It always returned 'nil' when assigning variables, but when assigning
functions it returned the Proc object.
Document ..