CRM-19690 - Mailing API - Encode and decode `template_options`
Present API consumers with a consistent, array-based interface for reading
and writing properties in a Mailing.
Suppose you're submitting a REST request to create a mailing. The REST
request as a whole is encoded with JSON. With the default API behavior, you
would need to double-encode the `template_options`, e.g. roughly
```
POST rest.php
json_encode([
entity => Mailing
action => create
params => [
template_options => json_encode([...])
]
])
```
With this patch, you only need to encode the request once.
This parallels the approach used in CaseType API (for the XML `definition`
field).