Mark some variables & function static
SCHED_IDLE and SCHED_BATCH can only be used with sched_priority 0

The function was randomly failing to drop the priority, because the
field was not initialized - it was random garbage instead of 0, leading
to EINVAL.
Merge pull request #53 from clbr/fixes

Fix scheduling policy change on Linux
Use only g_work_time to check work availability
Do not switch to Stratum if using an HTTP proxy
Make the --url option mandatory
Fix CPU affinity on FreeBSD (closes #61)