An Egyptian court has acquitted a top aide of former Libyan dictator Moammar Gadhafi of charges of attempted murder.