Separation of preferential interaction and excluded volume effects on DNA duplex and hairpin stability