Re #7768. Add d-spacing as an available filtering unit.

Garrett says that this is the one he would use most often.
Re #7768. Ensure selected variable doesn't get forgotten.

Previously, even if the user had chosen something else it would revert
to scan_index if the dataset was being filtered.