Your reasoning in 1 is correct. The pendulum starts at the vertical position with some maximized gravitational potential energy $mg\ell$, and ends after the first stroke with potential energy $mg\ell cos(\theta)$. Since there is no kinetic energy $K$ before or after this first swing and the gravitational potential energy of the rod does not change, conservation of energy requires that the work done (with convention that energy leaving the system is positive) would be the initial minus the final gravitational potential energy: $U_{i}-U{f}=\Delta E=W=mg\ell (1-cos(\theta))$. This convention is opposite from standard: usually $W=\Delta E=E_{f}-E_{i}=U_{f}-U{i}=mg\ell(cos(\theta)-1)$ would be written such that energy leaving the system is a negative value. You asked about the 'work done by the torque that gravity applies on the block.' Unlike the friction in the bearing of this pendulum, the gravitational force is a "conservative force," meaning the work it does is independent of the path the block takes. What matters is where the block starts and where the block ends. It is also important to say that the force of gravity does not remove energy from the block when it acts on the block. Rather, it converts the gravitational potential energy $U$ to kinetic energy $K$. Thus, if the pendulum had no friction, the block in the scenario you described would accelerate clockwise to the bottom of its travel. At the exact bottom, the system will have converted the maximum amount of $U$ to $K$, and it is the gravitational force that will have converted the energy from one form to the other. Then the block would continue, this time traveling upward. During this part of the motion, the gravitational force will convert the $K$ back into $U$ as the block rises. With no friction, the block would return to the top of the swing and continue around and around until the system is disturbed. Your system has friction, so whatever difference in total energy of the system exists between its initial and final state is the work performed by non conservative forces (the friction in this case): $\Delta E=W$.
In summary, the gravitational force does not remove energy from the pendulum system, it converts the energy of the system from one form to another. The change in energy of the system between successive oscillations of the pendulum is the work performed on the system by the bearing about which the pendulum swings. This energy is removed from the system in the form of heat.
For 2, your equation is correct if $\tau_{n}$, $\tau_{g}$, and $\alpha$ are vectors, but not if they are magnitudes. $\vec{\tau_{n}}$ acts in the opposite direction to $\vec{\tau_{g}}$ on the down stroke, and they act in the same direction on the up stroke. Your equation does not seem to take this fact into account. If your objective is to find $I$, and you know $\vec{\alpha(\theta)}$, you can solve for $I$ without integration so long as you derive the values of $\tau_{n}$ $\tau_{g}$ for a given position at which you also know the value of $\vec{\alpha}$. In general, using $\tau=I\alpha$ to solve for the moment of inertia of a system is a rough way to go (very non standard practice and extremely rare in problem sets). If you give more some more information about how your problem is setup, I can see if this plan is feasible, but finding I by "geometric" methods is much easier.
On the calculation of $I$ using integration of $\tau=I\alpha$:
For the system you have, the integral of both sides with respect to $\theta$ yields the following equation:
$I \int\vec{\alpha}d\theta=\int\vec{\tau_{g}}d\theta+\int\vec{\tau_{n}}d\theta$
$\int\vec{\tau_{n}}d\theta$ is the work performed by a torque created by the frictional force through an angle theta.
$\int\vec{\tau_{g}}d\theta$ is the work performed by the torque generated by the gravitational force through an angle theta.
$\int\vec{\alpha}d\theta$ is meaningless and not feasibly calculable. Here is why:
$|{\alpha}|\equiv\frac{d^2\theta}{dt^2}$ so $\int|\alpha|d\theta$ is an integral with respect to the independent variable, which is not possible.
So calculating I by the integration of your equation in 2 is almost certainly the wrong way to go.