param: use separate param save lock
param: use separate param save lock

param save is an expensive operation that can take several 100ms. And
previously it was possible that a param_get() caller was blocked on a
save operation. If this happened due to a param change notification,
important modules, such as sensors, could have been blocked for a longer
period (and affecting the flight performance).
With this patch, this situation is not possible anymore, because a param
save now uses the reader lock and a separate file lock.

However it is still possible that a param_set() needs to wait for a save
operation, thus blocking for a longer time. param_set() thus needs to be
avoided in important modules when the system is armed.
In the case of mavlink it works, since it does not affect the flight if
the mavlink receiver is blocked over a longer time. It is only problematic
if a joystick is used as input or in offboard control.

krbeverx/Firmware,Aerotenna/Firmware,mcgill-robotics/Firmware,mje-nz/PX4-Firmware,mje-nz/PX4-Firmware,acfloria/Firmware,jlecoeur/Firmware,Aerotenna/Firmware,krbeverx/Firmware,mcgill-robotics/Firmware,mcgill-robotics/Firmware,PX4/Firmware,jlecoeur/Firmware,PX4/Firmware,Aerotenna/Firmware,mcgill-robotics/Firmware,mje-nz/PX4-Firmware,mje-nz/PX4-Firmware,jlecoeur/Firmware,dagar/Firmware,Aerotenna/Firmware,krbeverx/Firmware,krbeverx/Firmware,mje-nz/PX4-Firmware,PX4/Firmware,acfloria/Firmware,jlecoeur/Firmware,acfloria/Firmware,acfloria/Firmware,dagar/Firmware,PX4/Firmware,Aerotenna/Firmware,dagar/Firmware,krbeverx/Firmware,mcgill-robotics/Firmware,jlecoeur/Firmware,mje-nz/PX4-Firmware,dagar/Firmware,jlecoeur/Firmware,mcgill-robotics/Firmware,mcgill-robotics/Firmware,mje-nz/PX4-Firmware,jlecoeur/Firmware,PX4/Firmware,dagar/Firmware,acfloria/Firmware,acfloria/Firmware,krbeverx/Firmware,Aerotenna/Firmware,dagar/Firmware,krbeverx/Firmware,dagar/Firmware,acfloria/Firmware,PX4/Firmware,jlecoeur/Firmware,PX4/Firmware,Aerotenna/Firmware