Compatibility fixes for pydo

- Raise error if the pydo returns any type other than a string or
  None
- :pydo should only touch lines that are meant to be changed, otherwise
  the buffer would be marked as changed even if no changes were made -
  i.e. pydo would *change* every buffer line to the previous value
- There will be more API calls for cases where changed/unchanged lines
  are interleaved, but less data being passed around if they are not
- Extend unittest for pydo to verify if the buffer remains unchanged
  when pydo returns None
- Change old unittest to return a string instead of an int