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.

Ptet rajouter un vrai usecase en docunit?