phpdoc
add factory method to get instance of stored document
add factory method to get instance of stored file
use factory methods to get document instance  in query bulider
phpdoc
add document to p[ool only if it enabled
fix tests