Measurement of the charge asymmetry in top-quark pair production in the lepton-plus-jets final state in $pp$ collision data at $\sqrt{s}=8$ TeV with the ATLAS detector