Pretty sure that would be down to your service provider and has nothing to do with HTC. I know in the UK, 02 have a deal where you can upgrade early and get 25% off the remaining cost of your current contract, not sure about other providers elsewhere though.
Yeah, HTC has no bearing on carrier contracts. Bite the bullet and sell your S5 and apply the remaining funds to buy the M9 at full price if you really want it. Once the S6 is out, the market will be flooded with S5's - FYI.
I agree dump it now. The prices are starting to drop now. I buy and sell a lot of phones and tablets and constantly watch prices. Best to dump it as early as possible to maximize your earnings.
HTC has had deals in the past to upgrade early and trade in your old phone. If you cant sell hopefully they will do it again.
If you're set on selling your Galaxy S5, right now would probably be the best time to do it. Before the S6 is revealed, before ebay and craigslist gets flooded with used Galaxy S5's.