Bringing the marijuana business into the 21st century might make the drug cheaper — and more predictable.