remove item in messages after timeout or click close button