Superconductivity and metal-semiconductor transition in BaPb1-xBixO3