@Farang *****
You have to get a letter from your school stating your last day of study. Then you take that to the immigration office about a week before that date. They will cancel your extension and re-stamp you in until the date on the letter. So you can cancel it ahead of time.
There is no requirement to stay out any amount of time by air, but you're likely to be denied entry if you try entering Thailand by air after having an education visa. Immigration know it's the most abused visa type, that people use to just live in Thailand and don't care about studying. If you just spent a year in Thailand on an ED visa and then leave and immediately return without a visa, they are going to pull you out of line, interrogate you for 1-2 hours, and probably deny entry for not having a visa and trying to live in Thailand.