Measurement of the lifetime of B-hadrons and a determination of |Vcb|