Measurement of the B+ and B-0 lifetimes using topological reconstruction of inclusive and semileptonic decays