A general approach to stability in free boundary problems