This error is caused by a bug in Android 4.4 when WhatsApp was installed in Android RunTime (ART).
The error is caused by a latent com.whatsapp folder left behind from the failed install of WhatsApp to 4.4 in your
/data/data/ directory that will prevent you from installing WhatsApp again. Android does not have any UI exposed to resolve this issue. Currently the only known way to remove this file is to reset your device to factory defaults.
A bug has been reported to Google regarding this issue, see here for other possible solutions and more information. A fix for the bug has been rolled out in 4.4.1, but the fix will not retroactively fix error -24.