Fix the resolution logic of resources protection

 - fix incorrect protection labels in add or edit material dialogs
 - fix missing "red key" to indicate protected resources/materials
 - fix missing Protection tab in edit resource/material dialog
 - fix #1595