add tests to improve test coverage

Added tests which cover cases with default settings, the panic in
Gradient, and one where more workers are asked for than can be used.
Test coverage is 100%.
Merge pull request #6 from gonum/test-coverage-improvement

add tests to improve test coverage