[autotest] bluetooth_device_xmlrpc_server: Add has_device API

Add a method has_device so user can query if device with certain MAC
address exists. By doing this, user does not need to get the properties
in get_devices.

BUG=chromium:507410
TEST=not used yet.

Change-Id: I960084d59487f62bc021623a0134cf14684b11ea
Reviewed-on: https://chromium-review.googlesource.com/283756
Reviewed-by: Wai-Hong Tam <waihong@chromium.org>
Commit-Queue: Cheng-Yi Chiang <cychiang@chromium.org>
Tested-by: Cheng-Yi Chiang <cychiang@chromium.org>
diff --git a/server/cros/bluetooth/bluetooth_device.py b/server/cros/bluetooth/bluetooth_device.py
index e322714..9e8c541 100644
--- a/server/cros/bluetooth/bluetooth_device.py
+++ b/server/cros/bluetooth/bluetooth_device.py
@@ -233,6 +233,18 @@
         return self._proxy.register_profile(path, uuid, options)
 
 
+    def has_device(self, address):
+        """Checks if the device with a given address exists.
+
+        @param address: Address of the device.
+
+        @returns: True if there is a device with that address.
+                  False otherwise.
+
+        """
+        return self._proxy.has_device(address)
+
+
     def pair_legacy_device(self, address, pin, timeout):
         """Pairs a device with a given pin code.