Merge pull request #1376 from ZER0/toggle-disabled/966730

fix Bug 966730 - Disabling toggle buttons doesn't work r=@gozala
 Bug 849412 - Functions are logged as "null" in Addon SDK content scripts

- Updated the `replacer` for JSON.stringify in order to propagate functions as string only for `console` type of messages
- Added tests