Eliminate use of `extract()` in `wp_link_pages()`. 

Adds unit tests to a new file: `tests/post/template.php`. 
There were previously no unit tests for `wp_link_pages()`.
	
See #22400.


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