Fixes related_links, stops meta data from saving duplicates

This PR will break the build on Travis because the tests need to be updated to match some key changes in the way the validation routine works. Namely, we rely on the `global $post`variable when comparing existing metadata rather than the `$_POST` superglobal. This is because the former is an object with significantly more, and more useful, data about the current post. Rather than making database calls, we can use the cached object WordPress already makes available for us. Working on a commit to update those tests but it should be safe to merge this PR now if the stuff in it is urgent enough that it can't wait until the morning.