wp_get_shortlink() improvements.

* Return shortlinks for pages and public CPTs.
* Return shortlinks even when cruft-free links are not enabled.
* Unit tests

Props sillybean, layotte, cais
fixes #18632
see #14760


Built from https://develop.svn.wordpress.org/trunk@25030


git-svn-id: https://core.svn.wordpress.org/trunk@25017 1a063a9b-81f0-0310-95a4-ce76da25c4cd