switch hosts between []string and []interface{}

Instead of casting the hosts value to []interface{} in FilterByHosts (which
doesnt work in PEM format because hosts are saved as []string), this patch
checks the type of hosts field (either []string or []interface{}) and behaves
accordingly.

Without the patch, running `go run gencert.go` in tlsdemo will panic
because filtered hosts are empty after casting.

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)