A woman who fired a rifle inside a Houston megachurch Sunday and was killed by law enforcement had a history of mental illness, a string of arrests spanning nearly two decades and family who had previously sought help from authorities to prevent her from accessing weapons, according to interviews and court documents.