virttest.utils_misc: add function to get the maxi ID for pty chardev

when hot-pluging in pseudoterminal interfaces to VM for pty device,
we must specify the device source path (/dev/pts/<number>) for it.
The function get_dev_pts_max_id() can used to get the maxi and occupied
device number.
and then, user can specify the available source path based on it.