function makeProxyLayer(layer) {
  const fakeLayer = {
    handle_request: function () {
      layer.handle_request.apply(layer, arguments)
    },
    handle_error: function () {
      layer.handle_error.apply(layer, arguments)
    }
  }
  Object.keys(layer).forEach(function (k) {
    if (!fakeLayer[k]) {
      fakeLayer[k] = layer[k]
    }
  })
  Object.keys(layer.constructor.prototype).forEach(function (k) {
    if (!fakeLayer[k]) {
      fakeLayer[k] = layer[k]
    }
  })
  return fakeLayer
}
Wraps a layer in a proxy with all of the layer's prototype's methods directly
on itself.

@param {express.Layer} layer - The layer to proxy.

@returns {object} A POD object with all the fields of the layer copied over.