Core: Work Media
Add unlinkAllMedia methods.
jshint fixes.
Really use replaces field instead of argument.
Core media tests.
core.addMediaToWork + minor fixes.
Check original work permissions when linking media.
Misc fixes.
Merge pull request #40 from commonsmachinery/core-media

Core media