make sure pages with published being false are not generated

In the [documentation](http://jekyllrb.com/docs/frontmatter/) it says `published` can be used both in page and post. But it's only effective in post.

This commit makes `published` front matter also effective for pages. It also refactors the current implementation of `published` feature.