Discard the flash at the end of the current action when rendering js.

This prevents success / error messages from appearing on the next request.

@amansinghb small and subtle. thanks