Hamiltonian cycles in Cayley graphs of semidirect products of finite groups