Return a partial count for tracer read.

8c070ac70076bb6462b030e5876962759f4ce0e9 introduced new behavior which would
cause the tracer to return an error (-1) if any ptrace(PEEKDATA, ...) failed.
Certain system calls like ioctl expect a partial read instead. This commit
restores the old behavior.

I've also added some extra debug output on error to help identify these
failures in the future. Before any ptrace error would just be silently ignored
which could hide a problem that reappears as something worse later.

Fixes #518.