Fixed replacing whole document

- json pointer to_last operation returns None for the part in the
  case that it is a whole document pointer
- json patch now checks to see if the part is None and simply returns
  the value to replace the document
- Added a test to verify the fix