People taken ill by coronavirus infections may experience psychiatric problems while hospitalized and potentially after they recover, research suggests.