Added checks for NULL return from various packagekit functions.

Javi,

Here is the patch to nodepackagekit.cc that checks for NULL results coming back from packagekit itself.

I ended up making a common function, copyPkResultsToArray(), and then used that for these NULL checks in various methods of nodepackagekit.

Try it and see if it gets rid of your segfault(s).