Efficient Reprogramming of Memristive Crossbars for DNNs: Weight Sorting and Bit Stucking