Joint Time Allocation and Beamforming Design for IRS-Aided Coexistent Cellular and Sensor Networks