Fix NPE when "Pictures" section is empty

Currently we only check for jsonShares' being null and return if
that is the case. Shares object might not be null but the sources
node might be. Verify it's not null before continuing.
Fix "Shutdown" not working

Shutdown uses the EventServer and this brings up the shutdown
dialog where you need to choose what to do. This behaviour is not
inline with what we experience on iOS client and makes it hard to
shut down a system from remote as the selection might end up in
dialog close or the first item. Convert the call to JSON-RPC
instead. This will gracefully shutdown the XBMC server and power
off the system.