Hungary's president has refused Prime Minister Péter Magyar's demands to step aside, setting up a constitutional clash.