Made constants pre-definable

Made all constants for core scripts pre-definable with #define lines
before the #include lines for the scripts. This makes setting limits
easier and doesn't require editing the libraries.

Also added constants section to documentation with descriptions for each
constant.