Sydney has been hammered by days of grim weather with storms knocking down trees and sparking widespread flood warnings.