Tropical Convexity, Halfspace Arrangements And Optimization