Measurement of the Bc-meson lifetime in the decay Bc-→J/ψπ