Fixes #751: pass cell's value to canEdit when using a shared editor

The cell's value was being determined after `canEdit` was called.  Now the value is being retrieved first.  I also added a unit test for canEdit.