Create helper library for pg extension detection

[COOK-2571] Create helper library for pg extension detection