Rapidly rotating boson molecules with long- or short-range repulsion: An exact diagonalization study