THRIFT-4165: better cmake support for C++ language level selection; fixed compiler warnings

This closes #1236
diff --git a/build/docker/debian/Dockerfile b/build/docker/debian/Dockerfile
index 155e0af..7bc74fc 100644
--- a/build/docker/debian/Dockerfile
+++ b/build/docker/debian/Dockerfile
@@ -10,10 +10,11 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Apache Thrift Docker build environment for Centos
+# Apache Thrift Docker build environment for Debian
 #
 # Known missing client libraries:
-#  - None
+#  - dotnetcore
+#  - rust
 
 FROM buildpack-deps:jessie-scm
 MAINTAINER Apache Thrift <dev@thrift.apache.org>
@@ -21,6 +22,9 @@
 ENV DEBIAN_FRONTEND noninteractive
 
 # Add apt sources
+# jessie-backports for cmake and some ruby bits
+RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
+
 # Dart
 RUN curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
     curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list && \
@@ -31,12 +35,12 @@
       bison \
       build-essential \
       clang \
-      cmake \
       debhelper \
       flex \
-      pkg-config
+      pkg-config && \
+    apt-get -t jessie-backports install -y --no-install-recommends cmake
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get install -y --no-install-recommends \
 `# C++ dependencies` \
       libboost-dev \
       libboost-filesystem-dev \
@@ -50,14 +54,14 @@
       qtbase5-dev \
       qtbase5-dev-tools
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get install -y --no-install-recommends \
 `# Java dependencies` \
       ant \
       ant-optional \
       openjdk-7-jdk \
       maven
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get install -y --no-install-recommends \
 `# Python dependencies` \
       python-all \
       python-all-dbg \
@@ -72,7 +76,7 @@
       python3-setuptools \
       python3-pip
 
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get install -y --no-install-recommends \
 `# Ruby dependencies` \
       ruby \
       ruby-dev \
@@ -83,9 +87,8 @@
       libio-socket-ssl-perl \
       libnet-ssleay-perl
 
-RUN echo "deb http://ftp.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/jessie-backports.list
-RUN apt-get update && apt-get -t jessie-backports install -y ruby-bundler
-RUN apt-get update && apt-get install -y --no-install-recommends \
+RUN apt-get -t jessie-backports install -y ruby-bundler
+RUN apt-get install -y --no-install-recommends \
 `# Php dependencies` \
       php5 \
       php5-dev \