add support for data retention in REST API

This PR adds support for including data retention when creating metrics. The JSON responses have also been updated to include a ```dataRetenion``` field when it is set.