Update polynomial.c

Added error checks to various functions
Update polynomial.h

Enumeration type and corrections to function declarations
Merge pull request #13 from GearoidCremin/master

Error handling for some of the functions