Lebanese army detains man after deadly funeral attack