Pipit: A momentum space optical potential code for pions