Use more sensible types.

Change function signatures to accept a size_t for parameters
representing lengths. Use int or unsigned int for counters that do not
represent a size.

Remove useless casts.
Remove dead code in sha256.c.
Don't include vim.h in sha256 (issue #918).

The only vim.h type sha needs is char_u, which is defined in types.h, so
include that instead.