nmdb: Make cache_set(), cache_cas() and cache_incr() return 0 on success
cache_set() and cache_cas() return different values according to the
result. One of them is always success, the rest are different errors.
A traditional C convention is to encode that using 0 for success, and
< 0 for errors.
This patch updates their APIs to follow that convention.
While at it, it also simplifies some of the error paths, to make them return
directly instead of performing unnecessary gotos.
Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>