Rabbit,
All of your sentences are correct.
The gerund 'watering' and the infinitive 'to water' both serve as appositives for the subject 'it'. Both the gerund and the infinitive function as nouns that restate the subject 'It'. When they are placed at the end of a sentence with 'It' as subject they are called delayed appositives.
It's a mere waste of time waiting any longer. = Waiting any longer is a mere waste of time.
It (waiting any longer) is a mere waste of time.
It's a mere waste of time to wait any longer. = To wait any longer is a mere waste of time.
It (to wait any longer) is a mere waste of time.
It's a waste of time watering the garden when it is raining. = Watering the garden when it is raining is a waste of time.
It (watering the garden when it is raining) is a waste of time.
It's a waste of time to water the garden when it is raining. = To water the garden when it is raining is a waste of time.
It (to water the garden when it is raining) is a waste of time.