Palestinian president fires PM, declares state of emergency