Personally, if we're prioritizing, I think he should do some math where they pay all treasury bonds, on time and 100%, and then just cut every other expenditure in half (or whichever % works out), across the board. Social security checks, contractor payments, gov't worker payments, etc. Anybody refuses to do work, send the half-paid national guard after them and order them, since we're in crazytown anyways. And tell them to write their congressman.
That's possibly the "least illegal" option, and certainly the most politically palatable, as far as respecting congress's self-contradictory legal orders in this mess.
See: http://www.volokh.com/2013/10/03/14th-amendment-option-table.
As for the illegality of prioritizing payments, as far as I can tell, out of the mandatory expenditures only a small amount is Constitutionally required (specifically, judges' salaries). The rest is only statutorily mandatory. As you correctly perceive, it seems preferable to commit a statutory violation to avoid a Constitutional one.
Constitution trumps amendments (but only in certain high-up courts), which trumps normal law, which trumps contracts (written "generally" before oral ones), which trumps common sense ("what a good house father would do"). The sum total of all these things form "the law" as viewed from the perspective of a person (so yes, you are legally obligated to "generally be good" even when the law doesn't explicitly require it (e.g. help people involved in accidents))
Basically since the government debt obligations are contracts, while the debt ceiling is a law, Obama has no choice in the matter : any lawful payments (like medicare, ...) have to be fulfilled before any contract is paid. So barring a new law (the "agreement" the news talks about), on Okt 17, the US should default. Maybe Obama can delay it a few days, but certainly no more.
Please note that congress is doing exactly what it was designed to do. Congress, whether you agree with it or not, represents the will of the people of the united states and Obama is ignoring it, refusing to do so much as negotiate (or so claims congress, and I see no reason to doubt their claims). He knew years in advance that this was coming and gambled. Every executive who has fought congress on this has failed, again something Obama is perfectly aware of (it featured prominently in his education for one thing, hell, it's one of the main forces that brought us democracy in the first place).
In case someone doesn't know this : Obama's a lawyer. Lawyers tend to be lawyers first, people second. And he has a history of this sort of thing : expect him to follow the law over common sense.
The Affordable Care Act was passed through normal legislative processes and defended by the judicial system. It has also survived an almost constant legislative assault since then.
Shutting down the government and threatening default over a piece of legislation you don't like is not part of the normal legislative process. It's radical. And you can even argue that with cute little last minute rule changes like HR 368 that it's borderline undemocratic as well. The American people may have mixed opinions on the Affordable Care Act, but I highly doubt they wanted the federal government shut down over it.
By refusing to bring a bill to a vote unless a majority of his party openly supports it, Boehner is explicitly preventing compromise.
Yeah, but Article II charges the President with taking care that the laws be faithfully executed. To quote Lincoln (in a different context, certainly), "are all the laws but one to go unexecuted and the Government itself go to pieces lest that one be violated?" Obama would be on solid legal ground in saying that he has to reconcile conflicting congressional mandates by ignoring the debt ceiling.
(On the other hand, I read today that any debt that was issued above the debt ceiling would be a lot more costly because buyers would insist on premium interest rates to compensate for the increased legal risk that the debt would be held invalid.)