Lebanon fell short of qualifying for the Asian Cup knockout stage in agonising fashion, despite beating North Korea 4-1 in their final Group E match.