Brexit threatens Gibraltar's security, officials warn