Refactoring std os setenv

Hello!

After talking with @huonw on Irc and trying different thing, I purpose to add a error handling over this wrapper of libc::setenv for catching errors.

I will need some help on the two commit marked as `fixup!`. I am still a newbie to rust. :)
Yep I see I missed my git kun-fu. ;)