Fix assigning to an endpoint. Closes #896.
Merge pull request #901 from chebfun/fix-chebfun-definepoint

Fix chebfun definepoint