Lehmer Codes and Poincaré Polynomials of Schubert Varieties in Types A and B