make LinearMap fields private

Closes #4764
auto merge of #5199 : thestinger/rust/hashmap, r=brson

Closes #4764