backport for #8407, fixes to base/linalg/blas.jl

* L42: import `BlasReal` and `BlasComplex`
* L143: for `dot`: `BlasFloat` to `BlasReal`
  - BLAS `dot` only applies to real numbers
* L148: for `dotc`: `BlasFloat` to `BlasComplex`
  - BLAS `dotc` only applies to complex numbers
* L153: for `dotu`: `BlasFloat` to `BlasComplex`
  - BLAS `dotu` only applies to complex numbers
* L238: remove line in `iamax`
  - `x` is not an input variable
  - cannot compute length of a pointer
* L308: fix computation of length of output vector in `gbmv`