Added enum class for session state.
Added state flags for torrent session.