Realization of ultrabroadband THz/IR photoresponse in a bias-tunable ratchet photodetector