add an optional argument to errno for setting it

use cglobal instead of jl_errno

move errno-related functions to C interface section of docs
Merge branch 'master' of github.com:JuliaLang/julia