MAINT: dotblas: factor out all gemm and gemv calls

This is a major cleanup to `_dotblas` that trims the module by more than 80 lines of code. There's no change in functionality.