So, I had a similar issue with my mid-2012 MBP these days. I recently replaced the battery and also installed a new SSD and did a dirty update to ElCap. Everything was fine for a week or so, and then while on a business trip, I woke up and saw that the battery was at 0% after being plugged in all night. After a slow/glitchy startup, I noticed that kernel_task was running at between 300-400% of CPU. I could barely move the cursor, and opening any program or webpage took an eternity. Clearing PRAM/NVRAM solved the problem for a minute, but then the problem returned. I tried to reset the SMC, but I don't think I did that correctly. I also ran OnyX and repaired some permissions and did some other general maintenance, but it didn't help much either.
I finally ran the hardware test and found the same error as the original poster. I got home last night, and swapped the old (original) battery back in, and problem solved. It had installed a third party battery, so at some point it went bad, and the result was that kernel_task was spending all its energy trying to locate a power source to charge. I've only been using this for a few hours, but it's running exactly as I would hope, in particular with a new SSD. Kernel_task is now down around 3-4%, which I assume is normal.
Hope this helps.
Mid 2012 MBP/16gb RAM/500gb SSD