Add sanity check for tile coordinates (#823)

Coordinates are casted from OPJ_UINT32 to OPJ_INT32
Add sanity check for negative values and upper bound becoming lower
than lower bound.
See also
https://pdfium.googlesource.com/pdfium/+/b6befb2ed2485a3805cddea86dc7574510178ea9
void opj_tcd_destroy(opj_tcd_t *tcd) {
        if (tcd) {
                opj_tcd_free_tile(tcd);

                if (tcd->tcd_image) {
                        opj_free(tcd->tcd_image);
                        tcd->tcd_image = 00;
                }
                opj_free(tcd);
        }
}

void opj_tcd_destroy(opj_tcd_t *tcd) {
        if (tcd) {
                opj_tcd_free_tile(tcd);

                if (tcd->tcd_image) {
                        opj_free(tcd->tcd_image);
                        tcd->tcd_image = 00;
                }
                opj_free(tcd);
        }
}
