Created pocket_detect.c/.h to make it easier to deal with s2w/s2s and dt2w

Signed-off-by: torrented <wallace.ryan10@gmail.com>