Twitter agreed to pay investors $809 million to settle a securities class action hours before jury selection was set to begin Monday in Oakland, California.