Restformat for client

This pull request makes the `RestFormat` class usable within the client. It also simplifies client classes and testing as well as reduces duplicated code.

**Old** (but still supported)
```php
  $response= $client->execute(create(new RestRequest('/'))
    ->withMethod(HttpConstants::POST)
    ->withPayload($data, new RestJsonSerializer())
  );
```

**New**
```php
  $response= $client->execute(create(new RestRequest('/'))
    ->withMethod(HttpConstants::POST)
    ->withPayload($data, RestFormat::$JSON)
  );
```