Write reservoir state in Eclipse binary format

This is a side-port of the writer portions of opm/opm-autodiff#52 to opm-core. It will need some additional polish before it is ready for merging, most notably it should take advantage of opm/opm-core#420 so that it can work on both `BlackoilState` and `TwophaseState`.