Flintlock mechanism