Mechanism Elucidation and Inhibitor Discovery against Serine and Metallo-Beta-Lactamases Involved in Bacterial Antibiotic Resistance