hoist({id, params, body}) {
    if (id) {
      this.declareVariable(id, id.name);
    }
    if (params) {
      this.hoistFunctionParams(params);
    }
    this.hoistVariables(body);
  }
Performs the hoisting of a function name, params and variables.

@param {Object} cfg
  @param {Identifier} cfg.id Optional function name
  @param {Identifier[]} cfg.params Optional function parameters
  @param {Object} cfg.body Function body node or Program node to search variables from.