Modified validation and callbacks handle more scenario

The slug is now generate prior validation which has two advantages.
It relies on validation to avoid any error at the database level with
regards to unique keys (title and slug).

It also make it possible to actually validate the slug when creating a
new post. Because the slug was generated after the validation, there was
no way to avoid duplicating a slug without doing another validation
outside the flow of validations.

Long story short, first code was very unstable and prone to exception.
This one is much better. Also added test coverage to make sure the
validation will always work.