Copy REST API setting

when create new server by copying existing ones, REST API settings are
not copied.

This patch can copy REST API settings.

As a side note, Secret.fromString() calls Jenkins instance to use
confidencial key. So ConfigTest have to use it.

Fix for JENKINS-23189