fix sorting network bug, add network compilation,...

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>