Make SendRequestRaw private.

-- Change json, socket.url, mime, ltn12 import lines to use the result
of require directly instead of storing it in a local variable first.
-- Only load sha1.lua if LuaSec was loaded.
- Overhaul sha1.lua to use Lua BitOp, bitlib or bit32 for bitwise
operation when possible, falling back to the existing pure Lua
functions.