lib: add standard/error.nit

This could help people to implement some error handling in libraries.

It is inspired by #701 and ideas from Alexandre Terrasa.

je sais pas trop. qu'en pense les autres?