Effective p-value computations using Finite Markov Chain Imbedding (FMCI): application to local score and to pattern statistics