Update get_alias(), get_primary_key() and added set_primary_key()

1. update `get_alias()` with `$field` parameter (now return
`"$alias"."$field"` if alias is set string);
2. modified `get_primary_key()` with table alias;
3. added `set_primary_key()` function.