Ultrathin two-dimensional materials for photo- and electrocatalytic hydrogen evolution