Refactoring and improvements from 8.x-1.x.
These patches are essentially cherry-picked commits from the 8.x-1.x branch. The first 2-3 are required to make others apply cleanly. But aside from that, all commits to the 8.x-1.x branch have been kept "atomic"; i.e., compatible for cherry-picking.
These are just basic code improvements, retaining the module's current functionality.
Much more to come... If you're interested in helping, ping me or comment on #1668360: Core developer git access for 8.x-1.x