Updating master with relevant changes in powder_mod_fix
I have added manually the relevant changes introduced in powder_mod_fix branch in the last months, including the python scripts for building the python api. I have tested that the calculation of the powder pattern with the python api works fine after adding changes.