Image forming apparatus capable of changing cut position on long medium and control method thereof