The BAHAMAS project: calibrated hydrodynamical simulations for large-scale structure cosmology