use qpd.optical_limit instead of qpd.kd.gamma solving rounding bug
Use same gamma-point check as other parts of response code.
Add test guarding against near-gamma kpoint case. The test will fail if it does not handle gammapoint.
Fixes: #1178 (closed)
Edited by Ask Hjorth Larsen