Add a timeout to clear message automatically feature

I needed a feature which would clear the messages after so many seconds when creating a new flash message.