Merge pull request #1472 from Ichimonji10/api-media

Improve the API layer for the Media class
"Added test for repository - upload content"

"Added test for repository - upload content"

"Added test for repository - upload content"
Merge pull request #1474 from tkolhar/test_cli

"Added test for repository - upload content"
Replacing instances of orm.type.get_value() with fauxfactory methods. Also, resolving merge conflicts.
Changed string formatting, and minor fixes.
Minor change to import and usage in entities.py.
Merge pull request #1473 from JacobCallahan/temp

Replacing instances of orm.type.get_value() with fauxfactory methods.
(API) Port old tests for hosts

Significantly update the definition of class `Host`: modify fields and override
the `build` method to properly create dependent entities. Enable CRUD tests for
hosts in module `test_multiple_paths`. Drop old CRUD tests for hosts.

Slightly clean up module `test_host_v2`.

Fix #1446.