Move getcwd tests to m4/fs.m4

Add a new KYUA_FS_GETCWD_DYN macro to m4/fs.m4 to include the already-
existing test to check if getcwd(3) can dynamically allocate memory.
Cache the result of KYUA_FS_GETCWD_DYN

This is to support cross-compilation.

Fixes #72.