3.0 entity pretty print

When unit testing I found myself doing this over and over:

```php
debug(json_encode($entity));
```
This is because the json representation of the entity is several times more readable than the debug output. This PR makes it a bit easier for me and hopefully for anyone wanting to quickly inspect the results of a query:

```php
debug((string)$entity);
//or
echo $entity;
```