Support use of __errno_location() for systems that use it to implement errno.

Add a simple test to ensure reading from and writing to errno is successful.