CMS-3958 Let ContentResource.listBy* return total number of contents

Added metadata to get total hits and number of hits in list results