High-skilled jobs maintaining Royal Navy vessels will be coming to Gosport after three vital deals were agreed.