Fixes #4188: API exceptions are now exposing less data when YII_DEBUG is false

- If exception is internal it's always returned as HTTP 500 general purpose one.
- Type isn't exposed anymore.
Merge pull request #4826 from yiisoft/rest-dont-show-full-exceptions-in-production

Fixes #4188: API exceptions are now exposing less data when YII_DEBUG is false