added multiply(matrix, int/double) with tests
fixed template inputs for dot_product