Magnetocaloric effect due to spin reorientation in the crystalline electrical field: Theory applied to DyAl_{2}