carry upstream patch for using specific kernels via OPENBLAS_CORETYPE

This is cherry-picked from https://github.com/xianyi/OpenBLAS/pull/386
and provides at least a workaround for Haswell and AMD problems seen in #6504, #7031