Relativistic quantum dynamics of scalar particles in the rainbow formalism of gravity