Toward order-by-order calculations of the nuclear and neutron matter equations of state in chiral effective field theory