Fixed cluster db model (important!!!)

This patch adds a new 'node_count' integer field to the cluster table.
The newly added field will be used for checking cluster status from DB
layer.

This patch also changes the 'profile_id' field to be 'profile_type',
this is because nodes in a cluster may have different versions of the
same profile type while the cluster should only care about the profile
type instead of a specific version.

Another fix is to the syntax error found in API.