Destroying units isn't a bad idea, in my opinion; I wouldn't say that it's a completely useless feature. Situations may occur where you want to destroy certain structures to make room for other units. Like many of you said, the AI could use this feature in many ways to fix some jamming (units clogging together). Also, you can take into account that the default location of some units is inconvenient (ex. when you start the game and the Defense Tower is in an awkward/useless position), so adding a unit/structure deletion feature could add some versatility. Like tomreyn said, there is sometimes a situation where your units are trapped.....
If this feature were to be implemented, however, I wouldn't suggest that the user be able to regain the full amount of resources used to create the destroyed structure/UNIT. Personally, I'd suggest that the user be allowed to recover 50% or 25% of the resources used (or maybe even none at all). By doing this, we'd be adding in a "recycle" sort of function in the game that could also be used in a strategic way. For example, units can be "recycled" in order to regain a partial amount of the resources used which can then be used to create other units that you maybe wouldn't have had the gold to build unless you "recycled".
Just an idea. I think this would be a great feature to implement.