edit util

clean up util, add functions, fix format_matrix(2) to return boolean mask

format_matrix(2) now returns boolean array to avoid calculating simulated_annealing or spectal partition on a weighted array, code duplication removed
cost2thesh(2) refactored to remove code duplication
added functions:
slice_data
threshold_adjacency_matrix
all_positive
make_cost_thresh_lookup

replaced redundant functions (now in numpy) with corresponding numpy functions
general code cleanup