rename: continue despite something failed

Try to do all file operations even when one or some of them fail, and
use exit value to inform what happen.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
rename: use function pointer to select file or symlink operation

Add separate functions to different functionality, and add a function for
the stuff that is in common for both.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
tests: add rename(1) return value check

Signed-off-by: Sami Kerola <kerolasa@iki.fi>