image/jpeg: reject invalid Ta and Td values.

Fixes issue 8693.

LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://codereview.appspot.com/141470043