Czech prime minister resigns and will quit politics