couple things here,
water heaters work on capacity/recovery. so just for an example, at 4gpm (average peak usage) with a 40 gal tank, just with capacity you should recieve hot water for 10mins. at whatever temperature the tstat on the tank is allowing. your shower head is somewhere between <1gpm to 3gpm. pretty wide range as far as water is concerned, but really not relavent to the point. the recovery rate is what really is going to help you decide whats going on unless you have complete failure.
if you are still getting hot water for at least a small amount of time, i feel you are on the right track with blaming your burner. however, just draining the tank will not allow everything that may be affecting the ability of the tank to drain out. a little bit of rusty/brownish water settled to the bottom is pretty normal. basing the thought completely on what you've said, i don't think this is your issue, simply because you got about 40gal. of hot water out in the span of about 10 mins. before it went cold.
i would say that you have a thermostat problem. usually the t-stat is incorporated into the gas valve. you may just have to replace that valve, and you're golden.
then again, i would not suggest you do this on your own.
cliff's notes: explore the possibilty of calling a contractor to trouble shoot the tank before replacing the entire unit, might save you some money.