This is an implementation of https://github.com/bitcoin/bips/blob/master/bip-0135.mediawiki .
It extends the BIP9 state machine processing with configurable per-bit window size, activation threshold and grace period parameters (minlockedblocks and minlockedtime).
The built-in deployments are parameterized to maintain backward compatibility, and the existing BIP9 tests are retained unmodified except for a minor fix made to versionbits_tests to improve the disjointness checks for configured bits).
A bip135_forks section has been added to the getblockchaininfo RPC output, leaving the existing bip9_softforks section for backward compatibility.
The check for 'unknown versions being mined' has been altered to take into account that for unknown bits, we can no longer rely on a 95% activation threshold. The p2p-versionbits-warning test has been modified accordingly - the new logic warns when an unknown bit exceeds 50/100 of the last blocks.
NOTE: This implementation contains a specific feature which is not covered by the specification (and thus not strictly required for BIP135): the optional loading of fork configuration from a CSV file (using -forks=datafile command line option) and the ability to dump out the built-in configuration in CSV format (-dumpforks option). This has been retained from the original reference implementation since it makes testing and adaptation of the configuration easier.