p-Adic hypergeometric functions and their cohomology