Quantum dot coupled to a suspended-beam mechanical resonator: From the unresolved- to the resolved-sideband regime