Aw man I wish you hadn't said that. Your logic board is on the fritz. THAT is hardware. When the iphone board starts to go it begins to switch the outputs and inputs making it think it has accessories plugged in when it doesn't.
There is one thing you can do however if you wanna pump some money into it and see if it helps. A small number of iPhone users have reported solving some hardware conflict resolution messages by replacing the flex cable in the phone. They are $25-ish + shipping on ebay and you have to completely disassemble the phone, install the new flex cable (which is a paper thin ribbon cable in the heart of the phone so be very careful), and put it all back together while crossing your fingers. It is the masses compiled opinion that you cannot take an iphone apart and put it back together without bends on the case or scratches so if your phone is perfect and you want it to stay like that you need to pay a pro to do it, but keep in mind they get about $65 an hour with a 2 hour minimum. By the time you buy the flex cable and pay someone to replace it, you might as well have chunked the phone or sold it for parts.
Now, do I think that replacing the flex cable will fix it? NO.
Is there a chance it WILL? Yes, a very ..... tiny one. So if you have the nuts to open the phone and the money to blow on it, knock yourself out. It's the ONLY thing it could be other than the logic board itself so it's a one shot deal. If it works, you win, it if doesn't you lose your money and time and have a dead phone. I'm only giving it a 15% chance of working, but that's a chance if you are a "glass half full" type of person.
......if your repair doesn't work (and don't get your hopes up on that flex cable) I want your parts....... don't break the thin glass screen taking it out of the phone when you try your repair - that's what I need and I got $50.00 with your name on it.
PS- As I said above keep in mind this is the issue after you have checked all your software possibilities, which you say you have.
If you are really scared to do the repair I'll do it. You can PM LT (see my thread in the classifieds) and ask him if I didn't do exactly what I said I would and what he asked me to do just as promised. I may need a screen, but if I can fix the phone, I sure as heck will and my needs can come later. It is with all my experience building iPhones and as an EE that you have a hardware issue though because you are drawing excessive power from the USB, shutting the hubs down, and have the dreaded accessory message with nothing in the ports. That's hardware. Software can't do that. A flex cable however, is indeed hardware so........ %15 chance it'll work.
EDIT: do this, go to cydia or installer (whatever you use) and get the battery app that shows detailed battery info. Tell me what it says either when it is just idling normally as you are sitting there unplugged and looking at the screen, or when charging at when you plug it into the wall charger. It will give you a milliamp rating. iPhones maximum safe draw is 500 ma, if it is pulling 750ma then your logic board is draining heavy current and you need to unplug it immediately. If it is 500ma, you are charging at a maximum safe current and this only means your issue may be sporadic which doesn't solve anything, but gives me more info