Make railties version match RAILS_VERSION
allow override of uuid_generate_v4() default by passing default: nil

without this, it's not possible to use UUID primary keys without uuid-ossp installed and activated
use constant for encoding
Improve docs for postgresql with uuid primary keys [ci skip]

Introduced in 09ac1776abc0d3482f491f2d49f47bcb3d9a4ad7.