Daisy cubes as resonance graphs and maximal independent sets of trees