Allow skipping exercises.

- Catch a special exit signal 55 to notify that we want to skip an
  excercise.
- Move is_enabled_service to functions.
- Fix bug 928390.

Change-Id: Iebf7a6f30a0f305a2a70173fb6b988bc07e34292
diff --git a/exercises/swift.sh b/exercises/swift.sh
index d8b41a3..732445d 100755
--- a/exercises/swift.sh
+++ b/exercises/swift.sh
@@ -36,6 +36,9 @@
 # Container name
 CONTAINER=ex-swift
 
+# If swift is not enabled we exit with exitcode 55 which mean
+# exercise is skipped.
+is_service_enabled swift || exit 55
 
 # Testing Swift
 # =============