### Describe the issue

The `getblocktemplate` RPC output does not list the 'rules' field in the template request object, as described in BIP9.
### What version of bitcoin-core are you using?

0.13.1rc1

CBlockIndex *pb = chainActive.Tip();
    if (height >= 0 && height < chainActive.Height())
        pb = chainActive[height];
    if (pb == NULL || !pb->nHeight)
        return 0;
    
    if (lookup <= 0)
        lookup = pb->nHeight % Params().GetConsensus().DifficultyAdjustmentInterval() + 1;
    
    if (lookup > pb->nHeight)
        lookup = pb->nHeight;
    CBlockIndex *pb0 = pb;
    int64_t minTime = pb0->GetBlockTime();
    int64_t maxTime = minTime;
    for (int i = 0; i < lookup; i++) {
        pb0 = pb0->pprev;
        int64_t time = pb0->GetBlockTime();
        minTime = std::min(time, minTime);
        maxTime = std::max(time, maxTime);
    }
    
    if (minTime == maxTime)
        return 0;
    arith_uint256 workDiff = pb->nChainWork - pb0->nChainWork;
    int64_t timeDiff = maxTime - minTime;
    return workDiff.getdouble() / timeDiff;
}
UniValue getnetworkhashps(const UniValue& params, bool fHelp)