Search for supersymmetry in final states with two same-sign or three leptons and jets using 36 fb$^{-1}$ of $\sqrt{s}=13$ TeV $pp$ collision data with the ATLAS detector