Well, both are true to some extent
I still think Elop was a very poor CEO; I don't know about history's worst, but he wasn't that good.
It is true that Elop inherited a dysfunctional company. Nokia's phones were selling well, but the Symbian S60 and S40 technological bases were technologically obsolete, apparently S60 made some pretty unusual use of C++ to speed things up (and probably save RAM) but making the API much more difficult than usual to use. They had multiple development projects dividing up resources, and several seemed to clearly be dead ends.
I'd say the first problem, Nokia was investing too much time and money into S60; they got Qt running on it, which extended S60's useful life some more years, but they really shouldn't have kept working on it further.
The Linux phone development was going pretty well, they had shipped a few nice wifi-only devices and one or two phones (N900 and the like.) They did have problems in that it sounds like this development was also quite scattered, including some team trying to make an S60-like environment to run on the Linux kernel. They were also (if I recall correctly) working on both Maemo and Meego. It sounds like these Maemo devices may have shipped a bit before the software was ready, but the software was fixed up pretty nicely via updates and these ended up being pretty nice; Nokia had been planning to ship the next iteration of these within a year or so.
Elop stepped in. He announced their current products were crap, making sure sales of their current devices would dry up quick. He axed development of all projects (other than hardware development of the next phone), including the ones that were shipping working products, to go with an unknown from Microsoft exclusively. I know the claim is that it was unforseeable that Windows Phone 7 turned out the way it was for them, but it kind of was clear that with Windows Phone 7, it was effectively a version 1 product (in terms of being so significantly different from Windows CE), and was therefore high risk.
If it were me... 1) I wouldn't say your existing products are crap! If people are still buying S60-based stuff, go ahead and sell it. 2) I would have cancelled some of the dead-end development projects, but Elop axed basically everything but the hardware development. I would have seen Maemo was shipping working products while Meego was not close to being there, and scrapped Meego development (pulling the useful portions into Maemo if possible.). 3) They should have worked up the new phones, but running a choice of Maemo or Windows Phone 7, since both were already running on it during development. They wouldn't have had their stock dive from the S60 sales dropping dead, and they would have had some S40 and S60 phones to sell, along with Maemo if Windows Phone 7 didn't sell how they hoped.
Microsoft did have a similar situation, the Windows CE API and kernel resembled Windows 3.1 more than a modern Windows version. Windows 7 Phone (and 8) do have a reasonably complete win32 API; they also went right to managed code so a lot of this is inaccessible, which from a security perspective is probably just as well.