s3: move BASE_RID to main includes.h (in preparation to separate passdb).