vf_frei0r: adjust error messages
vf_frei0r: prevent a segfault when filter parameters are not set
vf_frei0r: refactor library loading from env variable

strtok_r is not needed any more, so remove it from configure.
mathops: move macro to the only place it is used

This helps in disentangling lavf and lavc too.
put_bits: Remove unused includes

This requires adding includes to other files that relied on these being
included implicitly.