[SPARK-3410] The priority of shutdownhook for ApplicationMaster should not be integer literal

I think, it need to keep the priority of shutdown hook for ApplicationMaster than the priority of shutdown hook for o.a.h.FileSystem depending on changing the priority for FileSystem.
@sarutak an assertion is a good idea.  Could you change the priority back to 30 instead of 20?  Also instead of having 20 hardcoded in 2 different places can you make one static for this something like:

  val SHUTDOWN_HOOK_PRIORITY: int = 30

in the ApplicationMaster object area.