LayerMerge: Neural Network Depth Compression through Layer Pruning and Merging