linux: Replace ifdefs in ptrace with per-architecture callbacks
It's a cleanup; no (intended) functional changes.
Sponsored By: EPSRC
Reviewed By: kib
Differential Revision: https://reviews.freebsd.org/D32888
(cherry picked from commit 0bf8d5d5f43426321940e351939b0b712f28b08f)