Add function fnmatch()

According to
http://pubs.opengroup.org/onlinepubs/9699919799/functions/fnmatch.html
plus GNU extensions (if available)
Remove unused variable in the poll interface
Merge pull request #17 from ittner/add-fnmatch

Add function fnmatch() (thanks, Alexandre Ittner).
Merge pull request #18 from ittner/fix-unused-var

Remove unused variable (thanks, Alexandre Ittner).
Handle and report Pread allocation errors properly

Report Pread buffer allocation errors with pusherror, account for allocation
functions which don't modify errno.
Handle allocation of zero bytes in Pread properly: don't consider returned
NULL an error.
Add some "air" into Pread formatting.
Fix getgroups corner cases

Fix getgroups memory deallocation by simply using lua_newuserdata instead of
potentially mismatching lalloc/free pair.
Handle getgroups(0, NULL) returning 0 - although practically impossible,
documentation doesn't say it can't happen.
Handle getgroups returning negative values (reporting errors).
Merge pull request #19 from spbnick/master

Fix corner cases in Pread and Pgetgroups. Thanks to Nikolai Kondrashov.
Fix some deviant indentation.
Remove non-POSIX SIG_IGN and SIG_HOLD.
Clarify a NULL pointer.
Bump version to 5.1.16.
Allow signal handlers to be set to nil (unset), as well as a function or macro.
refactor: use macro splicing for more tabulation.

This would have prevented the recent unsynced signal tables bug,
but also use cpp metaprogramming to write more repetitive code
that needs to stay in sync between various strings and symbols.
* lposix.c (LPOSIX__STR): Remove +1 offset.
(LPOSIX__STR_1, LPOSIX_STR_1): Better name for +1 offset
stringification macros. Adjust all callers.
(sigmacros_map): New cpp table of signal symbol basenames.
(Ssigmacros, Fsigmacros): Generate from sigmacros_map.
(R): Use cpp to keep lua symbols and C implementations in sync.
(luaopen_posix_c): Replace each group of preprocessor exports with
a cpp macro call to keep C API macro values and their lua symbol
names in sync.
Merge pull request #20 from gvvaughan/pull-request/use-cpp-to-keep-symbols-in-sync

refactor: use macro splicing for more tabulation.
Use LPOSIX_STR_1 to prevent premature expansion of signal handler macro names.
Redo signal API to be more conventional, allowing signal handlers to be reset (no __newindex nonsense).
Explain why we don’t use an upvalue in an obvious situation.
signal: Cope with C handler functions.

Fix a bug in setting symbolic (SIG_IGN/DFL) handlers.

Make setting handler to nil indistinguishable from setting to SIG_DFL.
refactor: use lposix-style macro splicing in lcurses.

Make the style of lcurses.c more like lposix.c, with the aid of
splice and stringify macros, and judicious renaming to make
their usage pattern the same too.
* lcurses.c (LCURSES_SPLICE, LCURSES_STR, LCURSES_STR_1):
Analagous to LPOSIX_SPLICE, LPOSIX_STR and LPOSIX_STR_1
respectively.
(LC_NUMBER, LC_NUMBER2, LC_STRING, LC_STRING2, LC_BOOL)
(LC_BOOL2, LC_BOOLOK, LC_BOOLOK2): Change prefix of generated
functions from `lc_' to `C' so that LCURSES_STR_1 can be used
idiomatically.
(LCW_BOOLOK): Likewise, only changing from `lcw_' to `W' prefix.
(LCW_BOOLOK2): New macre used when the curses symbol and the lua
api have different names.
(lcw_new, lcw_get, lcw_check, lc_checkch, lc_optch): Rename from
these...
(lc_newwin, lc_getwin, lc_checkwin, checkch, optch): ...to
these, respectively, no need to namespace static symbols so
carefully. Adjust all callers.
(CC2): Remove.
(CF): New macro for generating FN key exports into lua. Use it
to export all 64 valid FN keys.
(LCW_WIN2): New macro.
(Wsyncup, Wcursyncup, Wsyncdown): Use it to define these
functions.
(LCW_WIN2YX): New macro.
(Wgetyx, Wgetparyx, Wgetbegyx, getmaxyx): Use it to define these
functions.
(LC_ATTROK): New macro.
(Cslk_attron, Cslk_attroff, Cslk_attrset): Use it to define
these functions.
(LC_TOGGLEOK): New macro.
(Ccbreak, Cecho, Craw, Cnl): Use it to define these functions.
(LCW_WINBOOLOK): New macro.
(Wintrflush, Wmeta, Wnodelay, Widlok, Wleaveok, Wscrollok): Use
it to define these functions.
(LCW_WININTOK): New macro.
(Wattroff, Wattron, Wattrset): Use it to define these functions.
(chstrlib, windowlib, curseslib): Much simplified by naming
implementation functions more carefully, and defining temporary
MENTRY macro to expand and splice arguments that populate the
tables.
curses: expose use_default_colors to lua.

* lcurses.c (Cuse_default_colors): Marshalling for
use_default_colors.
(curseslib): Add it.