You seem to think about agreements they could get you to sign, so why didn't you get them to sign an agreement to buy your car at at a set price if you pay off the title? This would have bound you and them to a contract. I think if you tried, it would have become really clear that the offer is not valid for weeks. Think about it, why would any company give you an offer for a car, then let you drive the car for over a month, while you still retain the option to not sell it to them if you change your mind (say the car value went up) or potentially damage the car (car accident?) or put tons of miles on it. That would be horrible business - it would be like selling stock options for free.
This clearly sounds like a miscommunication, they made you an offer with money in 2 weeks, you declined, they said if you had title in hand it would be an instant transaction, but the miscommunication was you assumed the offer had no expiry date. Had you at least asked about the offer expiry date, your ordeal could have been avoided. I know you feel wronged in this case, but if you think about it, the dealer didn't gain anything from "screwing you", so it's hard to assume they did it on purpose (what would that purpose be).
EDIT: for your future reference, all trade-in offers have an expiry date, mileage limitations, and usually escape clause in case the car was to be damaged. If you ever get an offer you're not taking on the spot, ask for those details.