Fix the failing `Tests_Link::test_wp_get_shortlink()` assertion:

* `wp_get_shortlink()` was firing a notice when reading `$post->ID` while `$post` was null in some cases
* Before the assertions that assume `$GLOBALS['post']` is not set, call `unset( $GLOBALS['post'] );` - there was global spillage from other tests

See #25282.




git-svn-id: https://develop.svn.wordpress.org/trunk@25404 602fd350-edb4-49c9-b593-d223f7449a82