Catch exceptions when serializing panel data.

There are many places that PDO or other non-serializable objects could
be hiding in application data. While we can try to filter out known bad
things, there is always a risk of objects containing non-serializable
objects in private/protected properties. In these situations we can only
catch the exception and nerf the panel.

Refs cakephp/cakephp#5358
Merge pull request #284 from cakephp/fix-fatal-variables

Catch exceptions when serializing panel data.