The Complexity of Splitting Necklaces and Bisecting Ham Sandwiches